package com.wn.class30.cotroller.houtai;

import com.wn.class30.entity.Integral;
import com.wn.class30.entity.Orderdeploy;
import com.wn.class30.service.IntegralDeployService;
import com.wn.class30.service.IntegralService;
import com.wn.class30.tools.Result;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 积分配置
 * @author yuyu
 * @since 2020/4/19 21:58
 */
@RestController
@Slf4j
@RequestMapping("/houtai/page/deploy/integarldeploy/")
public class IntegralController {

    @Resource
    private IntegralDeployService integralDeployService;

    @RequestMapping("list")
    @RequiresPermissions("/houtai/page/deploy/integralDeploy/list")
    public Result selectIntegralDeploys(){
        List<Integral> integralList = integralDeployService.selectIntegral();
        return new Result("200","success",null,integralList);
    }

    @RequestMapping("update")
    @RequiresPermissions("/houtai/page/deploy/integralDeploy/update")
    public Result updateIntegralDeploys(Integral integral){
        integralDeployService.updateByPrimaryKeySelective(integral);
        return new Result("200","success",null,null);
    }

}
